﻿using OpenCvSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CutShuFa.AutoAction
{
    public class CvHelper
    {
        public static Scalar ToGrayScalar(Scalar color)
        {
            double r = 299, g = 587, b = 114;
            return new Scalar(color.Val0 * r + color.Val1 * g + color.Val2 * b, color.Val3);
        }
    }
}
